package com.study.config;

import com.study.bean.BeanFactoryPostProcessorTest;
import com.study.bean.FactoryPostProcessor;
import com.study.bean.PostProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description TODO
 * @Author v_yangliu
 * @Date 2022/1/11 15:04
 * @Version 1.0
 **/
@Configuration
public class ConfigBean {
    @Bean
    public PostProcessor initPostProcessor(){
        return new PostProcessor();
    }

    @Bean
    public FactoryPostProcessor initFactoryPostProcessor(){
        return new FactoryPostProcessor();
    }

    @Bean
    public BeanFactoryPostProcessorTest initBeanFactoryPostProcessorTest(){
        BeanFactoryPostProcessorTest test=new BeanFactoryPostProcessorTest();
        test.setName("张三");
        test.setSex("男");
        return test;
    }
}
